<!--
    页面名称：超级管理员->添加管理员
    作者: 苗怀雨
    时间:2017年12月31日
    最后编辑：2017年12月31日20:20:13
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<tag:head title="添加管理员" ctx="${ctx}">
	<link href="${ctx}/assets/css/admin/admin_department_add/style.css" rel="stylesheet">	<!-- this page -->
</tag:head>

<tag:body>
	<!-- 左 上 导航 -->
	<tag:nav ctx="${ctx}"></tag:nav>

	<!-- page content -->
	<tag:content title="添加管理员">
		<div class="col-md-1"></div>
		<div class="col-md-10 col-sm-3 col-xs-12 form-horizontal">
			<form action="${ctx}/admin/addAdmin" method="post">
				<div class="form-group">
					<label class="control-label col-sm-2">用户名:</label>
					<div class="col-sm-10">
						<input type="text" name="username" placeholder="长度必须在7到12之间" class="form-control col-md-3 col-xs-12"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">密码:</label>
					<div class="col-sm-10">
						<input type="password" name="password" placeholder="长度必须在7到12之间" class="form-control col-md-3 col-xs-12"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">姓名:</label>
					<div class="col-sm-10">
						<input type="text" name="adminName" placeholder="长度不能超过10" class="form-control col-md-3 col-xs-12"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">角色:</label>
					<div class="col-sm-4">
						<select class="form-control" id="role" name="roleId">
							<option value="">无</option>
							<c:forEach var="role" items="${requestScope.roles}">
								<option value="${role.roleId}">${role.name}</option>
							</c:forEach>
						</select>
						<small>管理员涉及部分的员工权限会失效</small>
					</div>
				</div>
				<div class="ln_solid"></div>
				<div class="form-group">
					<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-4">
						<button id="save" type="button" class="btn btn-success">保存</button>
						<button type="button" class="btn btn-info">返回</button>
					</div>
				</div>
				<div class="emptyRow"></div>
			</form>
		</div>
	</tag:content>

	<!-- footer content -->
	<tag:footer></tag:footer>
</tag:body>
<!-- javascript-->
<tag:javascript ctx="${ctx}">
	<script src="${ctx}/assets/js/admin/admin_admin_add/admin_admin_add.js"></script>	<!-- this page -->
	<script>
		<c:if test="${requestScope.error != null}">
			createPNotify("提示信息","error","${requestScope.error}");
		</c:if>
	</script>
</tag:javascript>
</html>

<!-- start:添加权限 -->
<div class="modal fade bs-example-modal-ap" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title" id="myModalLabel">权限</h4>
			</div>
			<div class="modal-body">
				<div class="row">
					<table class="table table-striped jambo_table bulk_action">
						<thead>
						<tr class="headings">
							<th class="column-title"> 选择</th>
							<th class="column-title"> ID</th>
							<th class="column-title"> 权限名称</th>
							<th class="column-title"> 类型</th>
						</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary">确定</button>
			</div>

		</div>
	</div>
</div>
<!-- end:添加权限-->

<!-- start:添加范围 -->
<div class="modal fade bs-example-modal-as" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title" id="myModalLabel">添加范围</h4>
			</div>
			<div class="modal-body">
				<div class="row">
					<div class="col-sm-6">
						<table id="datatable-checkbox" class="table table-striped table-bordered bulk_action" style="width: 100%">
							<thead>
							<tr>
								<th width="10%"><input type="checkbox" id="check-all"/></th>
								<th>部门ID</th>
								<th>部门名称</th>
							</tr>
							</thead>

							<tbody>
							</tbody>
						</table>
					</div>
					<div class="col-sm-6">
						<table id="datatable-checkbox2" class="table table-striped table-bordered bulk_action" style="width: 100%">
							<thead>
							<tr>
								<th width="10%" height="23px"></th>
								<th>部门ID</th>
								<th>部门名称</th>
							</tr>
							</thead>

							<tbody>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary">确定</button>
			</div>

		</div>
	</div>
</div>
<!-- end:添加权限 -->